<style>
    .form-horizontal{
        margin-left: 10px
    }
    .control-group .controls input, .control-group .controls textArea{
        width: 400px;
    }
    .control-group .controls input[type="submit"]{
        width: 100px;
        margin-bottom: 20px;
    }
</style>
<div class="post">
    <div class="title">
        <i class="icon12-title"></i>
        LIÊN HỆ</div>
    <div class="row-fluid">
        <div class="detail">
            <p><?php echo $contact->value ?></p>

        </div>
<?php if (Yii::app()->user->hasFlash('contact')): ?>

    <div class="flash-success">
        <?php echo Yii::app()->user->getFlash('contact'); ?>
    </div>

<?php else: ?>
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'contact-form',
        'htmlOptions' => array(
            'enctype' => 'multipart/form-data',
            'class' => 'form-horizontal'
        ),
    ));
    ?>

    <?php echo $form->errorSummary($model); ?>

    <div class="control-group">
        <?php echo $form->labelEx($model, 'name', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'name'); ?>
            <?php echo $form->error($model, 'name'); ?>
        </div>

    </div>

    <div class="control-group">
        <?php echo $form->labelEx($model, 'email', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'email'); ?>
            <?php echo $form->error($model, 'email'); ?>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'phone', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'phone'); ?>
            <?php echo $form->error($model, 'phone'); ?>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'subject', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'subject'); ?>
            <?php echo $form->error($model, 'subject'); ?>
        </div>
    </div>

    <div class="control-group">
        <?php echo $form->labelEx($model, 'body', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textArea($model, 'body'); ?>
            <?php echo $form->error($model, 'body'); ?>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label"></label>
        <div class="controls">
            <?php echo CHtml::submitButton('Gởi đi', array('class' => 'btn')); ?>
        </div>
    </div>

    <?php $this->endWidget(); ?>
    </div>
<?php endif; ?>
</div>
